/**
 * @Project Name:nacos-studio
 * @Package Name:cn.hoofungson.nacos.studio.controller.config
 * @Since JDK 1.8
 */
package cn.hoofungson.nacos.studio.controller.config;

import cn.hoofungson.nacos.studio.domain.vo.config.ConfigVO;
import jdk.nashorn.internal.objects.annotations.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 配置控制器
 * @Author 胡松 hoofungson@163.com
 * @Date 2019-03-18 15:42
 * @Version V1.0
 */
@RequestMapping(value = "/rest/api/config")
@RestController
public class ConfigController {

    @Autowired
    private ConfigVO configVO;

    @GetMapping
    public HttpEntity<Map<String, Object>> getConfigProperties(){
        Map<String, Object> responseMap = new HashMap<>();
        responseMap.put("code", 27001);
        responseMap.put("success", true);
        responseMap.put("message", "测试成功");
        responseMap.put("result:", configVO);
        return new HttpEntity<>(responseMap);
    }
}
